{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# **ShopGenie**\n",
        "Redifining the concept of Online shopping customer experience with agentic AI.\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "# Overview\n",
        "This AI agent , **ShopGenie** , is built on langGraph and aims to provide decisive shopping experience to all people using the power of LLM.It uses tavily for web search , and llama-3.1-70B-versatile model through groq. This ai agent is made using totally open source technologies.\n",
        "\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "# Motivation\n",
        "This AI agent is made to assist a customer to get best desired product specifically tailoured for his needs and wants. Eventhough if do not has any expertise in that particular field of whose product he wants to buy, still using the power of **ShopGenie** he could land for the best suited product for him.\n",
        "\n",
        "---\n",
        "\n",
        "#Key Features:\n",
        "- **Tavily** for web search.\n",
        "- **llama-3.1-70B** for arranging the data into specific schema and comparing products.\n",
        "- Tells the best product among the searched ones.\n",
        "- **Youtube API** for providing the review link of the best product for self-satisfaction.\n",
        "- **SMTP** for sending mail about the best product and its review to the user.\n"
      ],
      "metadata": {
        "id": "e7lrOBJmsrDB"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Important packages\n",
        "following are the required packeages for this agent to function."
      ],
      "metadata": {
        "id": "Cp96Qz-b1suY"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "%pip install langchain-groq langgraph tavily-python google-api-python-client langchain-community  beautifulsoup4  > /dev/null 2>&1"
      ],
      "metadata": {
        "id": "f3hphuoi2CyS"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Import necessary modules"
      ],
      "metadata": {
        "id": "GDFX8i602M8p"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from langchain_groq import ChatGroq\n",
        "from langgraph.graph import StateGraph, START, END\n",
        "from tavily import TavilyClient\n",
        "from langchain_community.tools import TavilySearchResults\n",
        "from typing import List, Optional, Dict\n",
        "from typing_extensions import TypedDict\n",
        "from googleapiclient.discovery import build\n",
        "from google.colab import userdata\n",
        "from IPython.display import Image, display\n",
        "import getpass\n",
        "import os\n",
        "import json\n",
        "import bs4\n",
        "from langchain_community.document_loaders import WebBaseLoader\n",
        "from pydantic import BaseModel, HttpUrl, Field\n",
        "from langchain_core.output_parsers import JsonOutputParser\n",
        "from langchain_core.prompts import PromptTemplate\n",
        "import time"
      ],
      "metadata": {
        "id": "gE-x7ZLQ2nj2"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Setting environment variables\n",
        "These are the totally open source technologies used and environment variables which can be changed according to one's needs and availability"
      ],
      "metadata": {
        "id": "5QwldgzA2r4n"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "groq_api_key = userdata.get('GROQ_API_KEY')\n",
        "tavily_api_key = userdata.get('TAVILY_API_KEY')\n",
        "youtube_api_key = userdata.get('YOUTUBE_API_KEY')\n",
        "\n",
        "#LLM being used in this notebook\n",
        "llm = ChatGroq(\n",
        "    model=\"llama-3.1-70b-versatile\",\n",
        "    api_key=groq_api_key,\n",
        "    temperature=0.5,\n",
        ")\n",
        "\n",
        "#Tavily for web search\n",
        "tavily_client = TavilyClient(api_key=tavily_api_key)\n",
        "\n",
        "#Youtube api for video search\n",
        "youtube = build('youtube', 'v3', developerKey=youtube_api_key)"
      ],
      "metadata": {
        "id": "raOHipYX3Fsw"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Other Structures"
      ],
      "metadata": {
        "id": "APl7mXJb3d3g"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "\n",
        "\n",
        "class SpecsComparison(BaseModel):\n",
        "    processor: str = Field(..., description=\"Processor type and model, e.g., 'Snapdragon 888'\")\n",
        "    battery: str = Field(..., description=\"Battery capacity and type, e.g., '4500mAh'\")\n",
        "    camera: str = Field(..., description=\"Camera specs, e.g., '108MP primary'\")\n",
        "    display: str = Field(..., description=\"Display type, size, refresh rate, e.g., '6.5 inch OLED, 120Hz'\")\n",
        "    storage: str = Field(..., description=\"Storage options and expandability, e.g., '128GB, expandable'\")\n",
        "\n",
        "class RatingsComparison(BaseModel):\n",
        "    overall_rating: float = Field(..., description=\"Overall rating out of 5, e.g., 4.5\")\n",
        "    performance: float = Field(..., description=\"Rating for performance out of 5, e.g., 4.7\")\n",
        "    battery_life: float = Field(..., description=\"Rating for battery life out of 5, e.g., 4.3\")\n",
        "    camera_quality: float = Field(..., description=\"Rating for camera quality out of 5, e.g., 4.6\")\n",
        "    display_quality: float = Field(..., description=\"Rating for display quality out of 5, e.g., 4.8\")\n",
        "\n",
        "class Comparison(BaseModel):\n",
        "    product_name: str = Field(..., description=\"Name of the product\")\n",
        "    specs_comparison: SpecsComparison\n",
        "    ratings_comparison: RatingsComparison\n",
        "    reviews_summary: str = Field(..., description=\"Summary of key points from user reviews about this product\")\n",
        "\n",
        "class BestProduct(BaseModel):\n",
        "    product_name: str = Field(..., description=\"Name of the best product\")\n",
        "    justification: str = Field(..., description=\"Explanation of why this product is the best choice\")\n",
        "\n",
        "class ProductComparison(BaseModel):\n",
        "    comparisons: List[Comparison]\n",
        "    best_product: BestProduct\n",
        "\n",
        "class Highlights(BaseModel):\n",
        "    Camera: Optional[str] = None\n",
        "    Performance: Optional[str] = None\n",
        "    Display: Optional[str] = None\n",
        "    Fast_Charging: Optional[str] = None\n",
        "\n",
        "class SmartphoneReview(BaseModel):\n",
        "    \"\"\"A review of a smartphone.\"\"\"\n",
        "    title: str = Field(..., description=\"The title of the smartphone review\")\n",
        "    url: Optional[str] = Field(None, description=\"The URL of the smartphone review\")\n",
        "    content: Optional[str] = Field(None, description=\"The main content of the smartphone review\")\n",
        "    pros: Optional[List[str]] = Field(None, description=\"The pros of the smartphone\")\n",
        "    cons: Optional[List[str]] = Field(None, description=\"The cons of the smartphone\")\n",
        "    highlights: Optional[dict] = Field(None, description=\"The highlights of the smartphone\")\n",
        "    score: Optional[float] = Field(None, description=\"The score of the smartphone\")\n",
        "\n",
        "class ListOfSmartphoneReviews(BaseModel):\n",
        "    \"\"\"A list of smartphone reviews.\"\"\"\n",
        "    reviews: List[SmartphoneReview] = Field(..., description=\"List of individual smartphone reviews\")\n",
        "\n",
        "class EmailRecommendation(BaseModel):\n",
        "    subject: str = Field(..., description=\"The email subject line, designed to capture the recipient's attention.\")\n",
        "    heading: str = Field(..., description=\"The main heading of the email, introducing the recommended product.\")\n",
        "    justification_line: str = Field(..., description=\"A concise explanation of why the product is being recommended.\")"
      ],
      "metadata": {
        "id": "SnY2sbJh3t4U"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Main State"
      ],
      "metadata": {
        "id": "u7e-DIu13RGg"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "class State(TypedDict):\n",
        "    query: str\n",
        "    email: str\n",
        "    products: list[dict]\n",
        "    product_schema: list[SmartphoneReview]\n",
        "    blogs_content: Optional[List[dict]]\n",
        "    best_product: dict\n",
        "    comparison: list\n",
        "    youtube_link: str"
      ],
      "metadata": {
        "id": "vguVK6PS3Z7n"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Sending Email\n",
        "This is a complete function of sending mail which takes ShopGenie to next level and speaks of its potential"
      ],
      "metadata": {
        "id": "6XbPJSXM7zzl"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import smtplib\n",
        "from email.mime.text import MIMEText\n",
        "from email.mime.multipart import MIMEMultipart\n",
        "from google.colab import userdata\n",
        "\n",
        "def send_email(recipient_email, subject, body):\n",
        "    \"\"\"Send an email dynamically using SMTP.\"\"\"\n",
        "    # SMTP server configuration\n",
        "    smtp_server = \"smtp.gmail.com\"\n",
        "    smtp_port = 587\n",
        "    sender_email = userdata.get(\"GMAIL_USER\")\n",
        "    sender_password = userdata.get(\"GMAIL_PASS\")\n",
        "\n",
        "    try:\n",
        "        # Create email content\n",
        "        message = MIMEMultipart()\n",
        "        message['From'] = sender_email\n",
        "        message['To'] = recipient_email\n",
        "        message['Subject'] = subject\n",
        "\n",
        "        # Add the email body\n",
        "        message.attach(MIMEText(body, 'html'))\n",
        "\n",
        "        # Connect to the SMTP server\n",
        "        with smtplib.SMTP(smtp_server, smtp_port) as server:\n",
        "            server.starttls()  # Start TLS encryption\n",
        "            server.login(sender_email, sender_password)  # Login to the server\n",
        "            server.send_message(message)  # Send the email\n",
        "            print(f\"Email sent successfully to {recipient_email}.\")\n",
        "\n",
        "    except Exception as e:\n",
        "        print(f\"Failed to send email: {e}\")"
      ],
      "metadata": {
        "id": "boLmH2DP8Myf"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "#Email prompt template\n",
        "email_template_prompt = \"\"\"\n",
        "You are an expert email content writer.\n",
        "\n",
        "Generate an email recommendation based on the following inputs:\n",
        "- Product Name: {product_name}\n",
        "- Justification Line: {justification_line}\n",
        "- User Query: \"{user_query}\" (a general idea of the user's interest, such as \"a smartphone for photography\" or \"a premium gaming laptop\").\n",
        "\n",
        "Return your output in the following JSON format:\n",
        "{format_instructions}\n",
        "\n",
        "### Input Example:\n",
        "Product Name: Google Pixel 8 Pro\n",
        "Justification Line: Praised for its exceptional camera, advanced AI capabilities, and vibrant display.\n",
        "User Query: a phone with an amazing camera\n",
        "\n",
        "### Example Output:\n",
        "{{\n",
        "  \"subject\": \"Capture Every Moment with Google Pixel 8 Pro\",\n",
        "  \"heading\": \"Discover the Power of the Ultimate Photography Smartphone\",\n",
        "  \"justification_line\": \"Known for its exceptional camera quality, cutting-edge AI features, and vibrant display, the Google Pixel 8 Pro is perfect for photography enthusiasts.\"\n",
        "}}\n",
        "\n",
        "Now generate the email recommendation based on the inputs provided.\n",
        "\"\"\""
      ],
      "metadata": {
        "id": "zxa76M8X_RPF"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "#email html template\n",
        "email_html_template = \"\"\"\n",
        "    <html>\n",
        "    <head>\n",
        "        <style>\n",
        "            body {{\n",
        "                font-family: Arial, sans-serif;\n",
        "                margin: 0;\n",
        "                padding: 0;\n",
        "                background-color: #f4f4f4;\n",
        "            }}\n",
        "            .email-container {{\n",
        "                max-width: 600px;\n",
        "                margin: 20px auto;\n",
        "                background-color: #ffffff;\n",
        "                border-radius: 8px;\n",
        "                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n",
        "                overflow: hidden;\n",
        "            }}\n",
        "            .header {{\n",
        "                background-color: #007BFF;\n",
        "                color: #ffffff;\n",
        "                padding: 20px;\n",
        "                text-align: center;\n",
        "            }}\n",
        "            .header h1 {{\n",
        "                margin: 0;\n",
        "                font-size: 24px;\n",
        "            }}\n",
        "            .content {{\n",
        "                padding: 20px;\n",
        "            }}\n",
        "            .content h2 {{\n",
        "                color: #333333;\n",
        "                font-size: 20px;\n",
        "                margin-bottom: 10px;\n",
        "            }}\n",
        "            .content p {{\n",
        "                color: #555555;\n",
        "                font-size: 16px;\n",
        "                line-height: 1.5;\n",
        "            }}\n",
        "            .button {{\n",
        "                display: inline-block;\n",
        "                margin-top: 20px;\n",
        "                background-color: #007BFF;\n",
        "                color: #ffffff;\n",
        "                padding: 10px 20px;\n",
        "                text-decoration: none;\n",
        "                border-radius: 5px;\n",
        "            }}\n",
        "            .footer {{\n",
        "                text-align: center;\n",
        "                font-size: 14px;\n",
        "                color: #999999;\n",
        "                padding: 10px 20px;\n",
        "            }}\n",
        "            .footer a {{\n",
        "                color: #007BFF;\n",
        "                text-decoration: none;\n",
        "            }}\n",
        "        </style>\n",
        "    </head>\n",
        "    <body>\n",
        "        <div class=\"email-container\">\n",
        "            <div class=\"header\">\n",
        "                <h1>{heading}</h1>\n",
        "            </div>\n",
        "            <div class=\"content\">\n",
        "                <h2>Our Top Pick: {product_name}</h2>\n",
        "                <p>{justification}</p>\n",
        "                <p>Watch our in-depth review to explore why this phone is the best choice for you:</p>\n",
        "                <a href=\"{youtube_link}\" class=\"button\" target=\"_blank\">Watch the Review</a>\n",
        "            </div>\n",
        "            <div class=\"footer\">\n",
        "                <p>\n",
        "                    Want to learn more? Visit our website or follow us for more recommendations.\n",
        "                    <a href=\"https://www.youtube.com\">Explore Now</a>\n",
        "                </p>\n",
        "                <p>&copy; 2024 Smartphone Recommendations, All Rights Reserved.</p>\n",
        "            </div>\n",
        "        </div>\n",
        "    </body>\n",
        "    </html>\n",
        "    \"\"\""
      ],
      "metadata": {
        "id": "mYU-v95Q_aUC"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Loading web content\n",
        "This is the complete where the tavily loading all the content available on the web for that particular search"
      ],
      "metadata": {
        "id": "ady6nysp8RjZ"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Function to load content from a specific URL\n",
        "def load_blog_content(page_url):\n",
        "    try:\n",
        "        # Initialize WebBaseLoader with the URL\n",
        "        loader = WebBaseLoader(web_paths=[page_url], bs_get_text_kwargs={\"separator\": \" \", \"strip\": True})\n",
        "        loaded_content = loader.load()\n",
        "\n",
        "        # Extract full text from loaded content\n",
        "        blog_content = \" \".join([doc.page_content for doc in loaded_content])  # Assuming the loader returns a list of docs\n",
        "\n",
        "        # print(\"Loaded Blog Content:\", blog_content)\n",
        "        return blog_content\n",
        "\n",
        "    except Exception as e:\n",
        "        print(f\"Error loading blog content from URL {page_url}: {e}\")\n",
        "        return \"\""
      ],
      "metadata": {
        "id": "Xw0G0czo9SPb"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Nodes\n",
        "These are node which are performing the functiond in the ShopGenie and provides it the base."
      ],
      "metadata": {
        "id": "RX59ReRR9baC"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "#  Node function to search with Tavily and store content\n",
        "def tavily_search_node(state):\n",
        "    try:\n",
        "        # Use the user-provided query from the state\n",
        "        query = state.get('query', state['query'])\n",
        "        # Perform the search with Tavily to retrieve multiple blog links\n",
        "        response = tavily_client.search(query=query, max_results=1)\n",
        "        if \"results\" not in response or not response[\"results\"]:\n",
        "            raise ValueError(\"No results found for the given query.\")\n",
        "        # Initialize an empty list to store each blog's content\n",
        "        blogs_content = []\n",
        "        # Iterate over the search results\n",
        "        for blog in response['results']:\n",
        "            blog_url = blog.get(\"url\", \"\")\n",
        "            if blog_url:\n",
        "                # Load and store content from each URL using WebBaseLoader\n",
        "                content = load_blog_content(blog_url)\n",
        "                if content:\n",
        "                  # Append blog details to blogs_content\n",
        "                  blogs_content.append({\n",
        "                      \"title\": blog.get(\"title\", \"\"),\n",
        "                      \"url\": blog_url,\n",
        "                      \"content\": content,  # Use loaded content\n",
        "                      \"score\": blog.get(\"score\", \"\")\n",
        "                  })\n",
        "\n",
        "        # Store all blog contents in the state\n",
        "        if len(blogs_content) > 0:\n",
        "\n",
        "            print(\"Extracted Blogs Content:\", blogs_content)\n",
        "\n",
        "            return {\"blogs_content\":blogs_content}\n",
        "        else:\n",
        "            raise ValueError(\"No blogs content found.\")\n",
        "\n",
        "    except tavily.InvalidAPIKeyError:\n",
        "        print(\"Error: Invalid Tavily API key. Please verify your key.\")\n",
        "        return {\"blogs_content\": []}\n",
        "    except tavily.UsageLimitExceededError:\n",
        "        print(\"Error: Tavily usage limit exceeded. Check your plan or limits.\")\n",
        "        return {\"blogs_content\": []}\n",
        "    except Exception as e:\n",
        "        print(f\"Error with Tavily API call: {e}\")\n",
        "        return {\"blogs_content\": []}\n",
        "#mapping values extarcted from web search\n",
        "def schema_mapping_node(state: State):\n",
        "  max_retries = 2  # Maximum number of retries\n",
        "  wait_time = 60   # Wait time in seconds between retries (1 minute)\n",
        "  try:\n",
        "    # Check if \"blogs_content\" exists in the state and is not empty\n",
        "    if \"blogs_content\" in state and state[\"blogs_content\"]:\n",
        "            # Extract blog content from the state\n",
        "            blogs_content = state[\"blogs_content\"]\n",
        "            # Define the prompt\n",
        "            prompt_template = \"\"\"\n",
        "You are a professional assistant tasked with extracting structured information from a blogs.\n",
        "\n",
        "### Instructions:\n",
        "\n",
        "1. **Product Details**: For each product mentioned in the blog post, populate the `products` array with structured data for each item, including:\n",
        "   - `title`: The product name.\n",
        "   - `url`: Link to the blog post or relevant page.\n",
        "   - `content`: A concise summary of the product's main features or purpose.\n",
        "   - `pros`: A list of positive aspects or advantages of the product.if available other wise extract blog content.\n",
        "   - `cons`: A list of negative aspects or disadvantages.if available other wise extract blog content.\n",
        "   - `highlights`: A dictionary containing notable features or specifications.if available other wise extract blog content.\n",
        "   - `score`: A numerical rating score if available; otherwise, use `0.0`.\n",
        "\n",
        "### Blogs Contents: {blogs_content}\n",
        "\n",
        "After extracting all information, just return the response in the JSON structure given below. Do not add any extracted information. The JSON should be in a valid structure with no extra characters inside, like Python’s \\n.\n",
        "\n",
        "\n",
        "\"\"\"\n",
        "            # Set up a parser and inject instructions into the prompt template.\n",
        "            parser = JsonOutputParser(pydantic_object=ListOfSmartphoneReviews)\n",
        "            # Format the prompt with the full blogs content\n",
        "            prompt = PromptTemplate(\n",
        "                template = prompt_template,\n",
        "                input_variables = [\"blogs_content\"],\n",
        "                partial_variables={\"format_instructions\": parser.get_format_instructions()}\n",
        "            )\n",
        "            # Retry mechanism to invoke LLM and parse the response\n",
        "            for attempt in range(1, max_retries + 1):\n",
        "                # try:\n",
        "                    # Use LLM to process the prompt and return structured smartphone details\n",
        "                    chain = prompt | llm | parser  # Invokes LLM with the prepared prompt\n",
        "                    response = chain.invoke({\"blogs_content\": blogs_content})\n",
        "\n",
        "                    # Check if the response contains more than one product in the schema\n",
        "                    if response.get('products') and len(response['products']) > 1:\n",
        "                        # If valid, store the structured schema in the state\n",
        "                        return {\"product_schema\": response['products']}\n",
        "                    else:\n",
        "                        print(f\"Attempt {attempt} failed: Product schema has one or fewer products.\")\n",
        "\n",
        "                    # Wait for 1 minute before retrying if not successful and retry limit not reached\n",
        "                    if attempt < max_retries:\n",
        "                        time.sleep(wait_time)\n",
        "\n",
        "                # except Exception as retry_exception:\n",
        "                #     print(f\"Retry {attempt} error: {retry_exception}\")\n",
        "                #     if attempt < max_retries:\n",
        "                #         time.sleep(wait_time)\n",
        "\n",
        "            # Return an empty schema if all retries fail\n",
        "            print(\"All retry attempts failed to create a valid product schema with more than one product.\")\n",
        "            return {\"product_schema\": []}\n",
        "    else:\n",
        "      # If \"blogs_content\" is not present or is empty, log and return state unmodified\n",
        "      print(\"No blog content available or content is empty; schema extraction skipped.\")\n",
        "      return {\"product_schema\":[]}\n",
        "\n",
        "  except Exception as e:\n",
        "        # Error handling to catch any unexpected issues and log the error message\n",
        "        print(f\"Error occurred during schema extraction: {e}\")\n",
        "        return state\n",
        "#comparing the products\n",
        "def product_comparison_node(state: State):\n",
        "    try:\n",
        "      # Check if \"product_schema\" is present in the state and is not empty\n",
        "      if \"product_schema\" in state and state[\"product_schema\"]:\n",
        "        product_schema = state[\"product_schema\"]\n",
        "\n",
        "\n",
        "        prompt_template = \"\"\"\n",
        "1. **List of Products for Comparison (`comparisons`):**\n",
        "   - Each product should include:\n",
        "     - **Product Name**: The name of the product (e.g., \"Smartphone A\").\n",
        "     - **Specs Comparison**:\n",
        "       - **Processor**: Type and model of the processor (e.g., \"Snapdragon 888\").\n",
        "       - **Battery**: Battery capacity and type (e.g., \"4500mAh\").\n",
        "       - **Camera**: Camera specifications (e.g., \"108MP primary\").\n",
        "       - **Display**: Display type, size, and refresh rate (e.g., \"6.5 inch OLED, 120Hz\").\n",
        "       - **Storage**: Storage options and whether it is expandable (e.g., \"128GB, expandable\").\n",
        "     - **Ratings Comparison**:\n",
        "       - **Overall Rating**: Overall rating out of 5 (e.g., 4.5).\n",
        "       - **Performance**: Rating for performance out of 5 (e.g., 4.7).\n",
        "       - **Battery Life**: Rating for battery life out of 5 (e.g., 4.3).\n",
        "       - **Camera Quality**: Rating for camera quality out of 5 (e.g., 4.6).\n",
        "       - **Display Quality**: Rating for display quality out of 5 (e.g., 4.8).\n",
        "     - **Reviews Summary**: Summary of key points from user reviews that highlight the strengths and weaknesses of this product.\n",
        "\n",
        "2. **Best Product Selection (`best_product`):**\n",
        "   - **Product Name**: Select the best product among the compared items.\n",
        "   - **Justification**: Provide a brief explanation of why this product is considered the best choice. This should be based on factors such as balanced performance, high user ratings, advanced specifications, or unique features.\n",
        "\n",
        "---\n",
        "\n",
        "### Example Output:\n",
        "\n",
        "```json\n",
        "{{\n",
        "  \"comparisons\": [\n",
        "    {{\n",
        "      \"product_name\": \"Smartphone A\",\n",
        "      \"specs_comparison\": {{\n",
        "        \"processor\": \"Snapdragon 888\",\n",
        "        \"battery\": \"4500mAh\",\n",
        "        \"camera\": \"108MP primary\",\n",
        "        \"display\": \"6.5 inch OLED, 120Hz\",\n",
        "        \"storage\": \"128GB, expandable\"\n",
        "      }},\n",
        "      \"ratings_comparison\": {{\n",
        "        \"overall_rating\": 4.5,\n",
        "        \"performance\": 4.7,\n",
        "        \"battery_life\": 4.3,\n",
        "        \"camera_quality\": 4.6,\n",
        "        \"display_quality\": 4.8\n",
        "      }},\n",
        "      \"reviews_summary\": \"Highly rated for display quality and camera performance, with a strong processor. Battery life is good but may drain faster with heavy use.\"\n",
        "    }},\n",
        "    {{\n",
        "      \"product_name\": \"Smartphone B\",\n",
        "      \"specs_comparison\": {{\n",
        "        \"processor\": \"Apple A15 Bionic\",\n",
        "        \"battery\": \"4000mAh\",\n",
        "        \"camera\": \"12MP Dual\",\n",
        "        \"display\": \"6.1 inch Super Retina XDR, 60Hz\",\n",
        "        \"storage\": \"256GB, non-expandable\"\n",
        "      }},\n",
        "      \"ratings_comparison\": {{\n",
        "        \"overall_rating\": 4.6,\n",
        "        \"performance\": 4.8,\n",
        "        \"battery_life\": 4.1,\n",
        "        \"camera_quality\": 4.5,\n",
        "        \"display_quality\": 4.7\n",
        "      }},\n",
        "      \"reviews_summary\": \"Smooth user experience with excellent performance and display. The battery is slightly smaller but generally sufficient for moderate use.\"\n",
        "    }}\n",
        "  ],\n",
        "  \"best_product\": {{\n",
        "    \"product_name\": \"Smartphone A\",\n",
        "    \"justification\": \"Chosen for its high-quality display, strong camera, and balanced performance that meets most user needs.\"\n",
        "  }}\n",
        "}}\n",
        "\n",
        "```\n",
        "Here is the product data to analyze:\\n\n",
        "{product_data}\n",
        "\n",
        "\"\"\"\n",
        "        parser = JsonOutputParser(pydantic_object=ProductComparison)\n",
        "      # Format the prompt with the full blogs content\n",
        "        prompt = PromptTemplate(\n",
        "        template = prompt_template,\n",
        "        input_variables = [\"product_data\"],\n",
        "        partial_variables={\"format_instructions\": parser.get_format_instructions()}\n",
        "    )\n",
        "        # prompt = prompt_template.format(product_data=json.dumps(state['product_schema']))\n",
        "\n",
        "        # Use LLM to process the prompt and return structured smartphone details\n",
        "        chain = prompt | llm | parser  # Invokes LLM with the prepared prompt\n",
        "        # display(response.content)\n",
        "        response = chain.invoke({\"product_data\": json.dumps(state['product_schema'])})\n",
        "\n",
        "        # print(response['products'])\n",
        "        display(response)\n",
        "\n",
        "        return {\"comparison\": response['comparisons'],\"best_product\":response['best_product']}\n",
        "\n",
        "\n",
        "      else:\n",
        "          # If \"product_schema\" is missing or empty, log and skip comparison logic\n",
        "          print(\"No product schema available; product comparison skipped.\")\n",
        "          return state\n",
        "\n",
        "\n",
        "    except Exception as e:\n",
        "        print(f\"Error during product comparison: {e}\")\n",
        "        return {\"best_product\": {}, \"comparison_report\": \"Comparison failed\"}\n",
        "#youtube review\n",
        "def youtube_review_node(state: State):\n",
        "    best_product_name = state.get(\"best_product\", {}).get(\"product_name\")\n",
        "\n",
        "    if not best_product_name:\n",
        "        print(\"Skipping YouTube search: No best product found.\")\n",
        "        return {\"youtube_link\": None}\n",
        "\n",
        "    try:\n",
        "        search_response = youtube.search().list(\n",
        "            q=f\"{best_product_name} review\",\n",
        "            part=\"snippet\",\n",
        "            type=\"video\",\n",
        "            maxResults=1\n",
        "        ).execute()\n",
        "\n",
        "        video_items = search_response.get(\"items\", [])\n",
        "        if not video_items:\n",
        "            print(\"No YouTube videos found for the best product.\")\n",
        "            return {\"youtube_link\": None}\n",
        "\n",
        "        video_id = video_items[0][\"id\"][\"videoId\"]\n",
        "        youtube_link = f\"https://www.youtube.com/watch?v={video_id}\"\n",
        "        return {\"youtube_link\": youtube_link}\n",
        "\n",
        "    except Exception as e:\n",
        "        print(f\"Error during YouTube search: {e}\")\n",
        "        return {\"youtube_link\": None}\n",
        "#final display on the UI\n",
        "def display_node(state: State):\n",
        "  if \"comparison\" in state and state['comparison']:\n",
        "\n",
        "\n",
        "      return {\n",
        "        \"products\": state[\"product_schema\"],\n",
        "        \"best_product\": state[\"best_product\"],\n",
        "        \"comparison\": state[\"comparison\"],\n",
        "        \"youtube_link\": state[\"youtube_link\"]\n",
        "    }\n",
        "  else:\n",
        "    print(\"comparison not available\")\n",
        "#sending email\n",
        "def send_email_node(state:State):\n",
        "  if \"best_product\" in state and state['best_product']:\n",
        "    user_query = state[\"query\"]\n",
        "    best_product_name = state[\"best_product\"][\"product_name\"]\n",
        "    justification = state[\"best_product\"][\"justification\"]\n",
        "    youtube_link = state[\"youtube_link\"]\n",
        "    recipient_email=state['email']\n",
        "    parser = JsonOutputParser(pydantic_object=EmailRecommendation)\n",
        "    prompt = PromptTemplate(\n",
        "    template=email_template_prompt,\n",
        "    input_variables=[\"product_name\", \"justification_line\", \"user_query\"],\n",
        "    partial_variables={\"format_instructions\": parser.get_format_instructions()},\n",
        "    )\n",
        "    chain = prompt | llm | parser\n",
        "    response = chain.invoke({\"product_name\": best_product_name, \"justification_line\": justification, \"user_query\": user_query})\n",
        "    html_content = email_html_template.format(product_name=best_product_name, justification=response[\"justification_line\"], youtube_link=youtube_link,heading=response['heading'])\n",
        "    send_email(recipient_email,subject=response['subject'],body=html_content)"
      ],
      "metadata": {
        "id": "UubH-RnD9tTz"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Workflow\n",
        "Compiling the LangGraph workflow"
      ],
      "metadata": {
        "id": "SHRYkUJQ_mLQ"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Build the LangGraph\n",
        "builder = StateGraph(State)\n",
        "builder.add_node(\"tavily_search\", tavily_search_node)\n",
        "builder.add_node(\"schema_mapping\", schema_mapping_node)\n",
        "builder.add_node(\"product_comparison\", product_comparison_node)\n",
        "builder.add_node(\"youtube_review\", youtube_review_node)\n",
        "builder.add_node(\"display\", display_node)\n",
        "builder.add_node(\"send_email\", send_email_node)\n",
        "# Define edges to control flow between nodes\n",
        "builder.add_edge(START, \"tavily_search\")\n",
        "builder.add_edge(\"tavily_search\", \"schema_mapping\")\n",
        "builder.add_edge(\"schema_mapping\", \"product_comparison\")\n",
        "builder.add_edge(\"product_comparison\", \"youtube_review\")\n",
        "builder.add_edge(\"youtube_review\", \"display\")\n",
        "builder.add_edge(\"display\", END)\n",
        "builder.add_edge(\"youtube_review\",\"send_email\")\n",
        "builder.add_edge(\"send_email\",END)"
      ],
      "metadata": {
        "id": "YYnBj_6y_slH",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "ba3e6b0f-cb1f-4f3a-824a-53cd40f01783"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<langgraph.graph.state.StateGraph at 0x7f9d45b039d0>"
            ]
          },
          "metadata": {},
          "execution_count": 25
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Diagram"
      ],
      "metadata": {
        "id": "LqL14515_6B3"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Compile and display graph as Mermaid diagram\n",
        "graph = builder.compile()\n",
        "display(Image(graph.get_graph().draw_mermaid_png()))"
      ],
      "metadata": {
        "id": "_3a0sbae_9W3",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 647
        },
        "outputId": "a2e7c797-22ab-479a-981c-73f0d85e50ad"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAJ2CAIAAADQQ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kr7m/nW/DgkMhu4wwWmBaG50VHpB6ONv+6bwhb6tt3nwJ6ukXAEmBWMHBDiavjWsS9PLdhAGDf2gV8dgi1b4/2nTzw/GsZDbYM/ItZNDMYvVbAfxvMFHw9Fx2PJUOdtBfAOM6wG3kHDhK28oHtZ1kQ6/Oqay78HgnEiEK8DUwbsecLMayRsVAzTgB7+g8Pj+41lm7DNbhsxL1wbFvcTdgW8aYO+Am6Za3/CZTh2vEAXiQqmPzReRdsqsI4a7jFFxwpczg7nD46aL68CPmqr1zbfMdhsdpJYiCIIJMEyAMnTazfNwuWinjSLtpMvlsgxZ7QQ5L1Hy058HykN8rL1eguvAeCads6uN0PY4LEaSMFJOB1On+c6YLDiApmhJEKYI48+JwcNi/PaqqbOD6wAHdvDOC3E4blwHOLDjOsCBHdcBDuy4DnBgx3WAA7v/AJid3Qosrj46AAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<IPython.core.display.Image object>"
            ]
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Running the Graph"
      ],
      "metadata": {
        "id": "_xAcDzoQATYs"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Run the LangGraph workflow\n",
        "initial_state = {\"query\": \"Best smartphones under $1000\",\"email\":\"asadsher2324@gmail.com\"}\n",
        "\n",
        "for event in graph.stream(input=initial_state,stream_mode=\"updates\"):\n",
        "  print(event)"
      ],
      "metadata": {
        "id": "9p1af2HpAgXp",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "19cddfd5-b9c4-4810-e4ee-95e04bf2b5d9"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Extracted Blogs Content: [{'title': 'The Best Phones Under $1000 to Buy Today - NextPit', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': \"The Best Phones Under $1000 to Buy Today Buying Guide Buying Guide Smartphones The best smartphones Best under $400 Best under $200 Wearables The best Bluetooth headphones to buy in 2024 Which Garmin smartwatch is the best for me? The best Apple and Android smartwatches of 2024 Deals Samsung Galaxy S22: Should you buy it now? Buying the iPhone 13? Best OnePlus 11 offer: Where to buy it! Our Favorite Bluetti AC200L Power Station is $1000 Off Apple's M2 MacBook Air with 16 GB RAM for $749 is a Must-Have Laptop Apple's Thinner Watch Series 10 Falls to a New Low for 13% Off Reviews Reviews Smartphone Samsung Galaxy S23 Ultra review Samsung Galaxy S23 review Samsung Galaxy S23+ review Apple iPhone 14 Plus review Wearables OnePlus Buds Pro 2 review Sony WH-1000XM5 review Apple Watch Ultra review Nuki Smart Lock Pro 4.0 Review: Bid Your Keys Goodbye How This Withings Smart Scale Transformed My Understanding of My Body Samsung Galaxy Tab S10+: The Productivity Powerhouse You Pay For News News Apple iPhone Comparison Best iPad Samsung Galaxy S23 Ultra vs S22 Ultra Which Samsung phones will receive Android 13? Smartphone Android 13 iOS 16.4 Beta Wearables Apps Hidden iOS 18 Trick: iPhone Reboots Itself to Boost Anti-Theft Security Top 5 Apps of the Week: Carrion, Pokémon TCG Pocket, and More! One of the Most Famous Video Game Classics is Free This Week How To How To Smarthome How to check the battery status Samsung One UI Top 10 Android 13 gestures Apps Contacts not showing in WhatsApp? Get fast and easy translations on your Android Activate the incognito mode on YouTube How to Use Your Phone as a Wi-Fi Extender How to Install Xiaomi's Super Wallpapers on Compatible Android Smartphones Possible Fix for YouTube's New Update Glitches Topics Topics Smartphones Wearables Apps eMobility Smart Home More Forum Forum Latest forum posts Whatsapp non officiel avec mon numero de telephone The transition from Dalvik to Android Runtime (ART) has significantly enhanced app performance via JIT and AOT compilation. How do these techniques di Using AI to create Images Hello from a Newbie! Waze is not showing the map! Additional Macro Lens for Moto G Fast Hello everyone Gimbooks Pay Unanswered The transition from Dalvik to Android Runtime (ART) has significantly enhanced app performance via JIT and AOT compilation. How do these techniques di Gimbooks Pay [APP] Unique Zipper Lock Screen - Zip Lock New Member Introduction [App] 3D Parallax Wallpaper & Wallpaper 4K PHOTOS OUT OF ORDER ON WHATSAPP Kids Match Game: Play & Learn WhatsApp is pausing the audio when it’s on my ear Quick Links Recent posts Ask a question Post new thread Our forum rules Mods + Admins Hall of Fame Community Guide Search Login Hot topics Android 15 iOS 18 iPhone 16 iPhone 16 Pro Home Smartphone Hardware The Best Sub-$1,000 Smartphones You Can Buy in 2024 7 min read 7 min No comments 0 Nov 11, 2024, 10:46 AM © nextpit Rubens Eishima Writer Which high-end smartphone should you buy for under $1,000 in 2024? To help you choose the most powerful smartphone, the best camera smartphone, or simply a compact option, we have selected for you the best affordable flagships of the moment. Such as the Galaxy S24, the iPhone 16, and the Google Pixel 8 Pro. Table of Contents: The best sub-$1,000 smartphones in 2024 The best Android sub-$1000: Samsung Galaxy S24 The best sub-$1,000 iPhone: Apple iPhone 16 The best camera alternative under $1,000: Googl e Pixel 8\\xa0Pro The best sub-$1,000 foldable: Galaxy Z Flip 5 Why we select these\\xa0sub-$1,000 phones The best sub-$1,000 smartphones in 2024 Editor's choice The best iPhone Camera alternative Compact option Product Samsung Galaxy S24 Apple iPhone 16 Google Pixel 8 Pro Samsung Galaxy Z Flip 5 Picture Review Review: Samsung Galaxy S24 Review: Apple iPhone 16 Review: Google Pixel 8 Pro Review: Samsung Galaxy Z Flip 5 Performance Snapdragon 8 Gen 3 (US) Exynos 2400 (global) 8 GB LPDDR5X RAM 128 GB UFS 3.1 storage 256 GB UFS 4.0 storage No storage expansion Apple A18 8 GB RAM 128 / 256 / 512 GB storage No storage expansion Google Tensor G3 12 GB LPDDR5x RAM 128 / 256 / 512 / 1024 GB UFS 3.1 storage No storage expansion Snapdragon 8 Gen 2 8 GB RAM 256 / 512 GB UFS 4.0 storage No storage expansion Camera Wide: 50 MP, f/1.8, OIS Ultra-wide: 12 MP, f/2.2 3x telephoto: 10 MP, f/2.4, OIS Selfie: 12 MP, f/2.2 Main: 48 MP, f/1.6, OIS Ultra-wide: 12 MP, f/2.2 - Selfie: 12 MP, f/1.9 Main: 50 MP, f/1.68, OIS Ultra-wide: 48 MP, f/1.95 5x telephoto: 48 MP, f/2.8 Selfie: 10.5 MP, f/2.2 Main: 12 MP, f/1.8, OIS Ultra-wide: 12 MP, f/2.2 - Selfie: 10 MP, f/2.2 Offer* Check offer $ 799 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Check offer $ 0 . 01 (128 GB -  new) * Check offer (BestBuy) * Find on eBay (eBay) * Check offer $ 709 . 99 (128 GB -  new) * Check offer (Google) * Check offer (BestBuy) * Check offer $ 667 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * The best sub-$1000 Android: Samsung Galaxy S24 The S24 beautiful back can also delight smartphone customers. / © nextpit Shortly after its release, the Samsung Galaxy S24 quickly became our top pick for the best smartphones under $1,000. With this new model, Samsung has outdone itself once again, launching an impressive high-end device that not only features an exceptional 6.2-inch display but also delivers powerful performance with the Snapdragon 8 Gen 3 processor. Additionally, users can expect up to seven years of updates and innovative AI functions . Our review of the Galaxy S24 dives into what you can expect from these features. Also read: Best Samsung smartphones to buy in 2024 Samsung has remained true to its dimensions, and you can expect a compact semi-flagship with a good feel. Unfortunately, there are no innovations in the camera area, which is not necessarily a bad thing as the camera setup is still one of the best on the market. The battery also lasts a long time, but you are missing a modern quick-charging feature. Summary Buy Samsung Galaxy S24 Good Powerful AI functions Outstanding display Compact and good feel Commendable update policy Performance is absolutely okay Bad No camera upgrade 128 GB UFS 3.1 memory Larger battery, shorter runtime Charging not up to date Check offer $ 799 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Go to review Samsung Galaxy S24 Check offer $ 799 . 99 (128GB -  new) Check offer (Samsung) Free w/ trade-in (T-Mobile) The best sub-$1,000 iPhone: Apple iPhone 16 The new aligned camera arrangement makes it easy to spot the new model. / © nextpit With a streamlined selection of phones and with the discontinuation of the previous generation Pro model, the vanilla iPhone is the usual suggestion in this price category. For 2024, the demands of the AI trend dictated two discreet upgrades on the base model: Expanded RAM and a new A18 processor ready to power all the Apple Intelligence the phone can get and bring better energy efficiency to boot. Additionally, the iPhone 16 has not one but two new buttons, the Action button which debuted on the iPhone 15 Pro family, and the Camera Control, a capacitive and dual-stage button that can be used as a shutter button, shortcut, and camera settings selector. All these upgrades make the iPhone a more versatile camera for both stills and video. Summary Buy Apple iPhone 16 Good New shortcuts with the Action Button and Camera Control Major hardware upgrade thanks to A18 SoC and 8 GB RAM Image quality can be customized in many ways Outstanding battery life Bad Lags behind the competition without AI integration Only 60 Hz refresh rate for the display Camera Control is only really practical in landscape mode Check offer $ 0 . 01 (128 GB -  new) * Check offer (BestBuy) * Find on eBay (eBay) * Go to review Apple iPhone 16 $829.99 Check offer $ 0 . 01 (128 GB -  new) Check offer (BestBuy) Find on eBay (eBay) The best camera phone under $1,000: Google Pixel 8\\xa0Pro The Pixel 8 Pro is the king of smartphone photography. / © nextpit The Google Pixel 8 Pro is a pricier option than before, starting at $999, and it comes in cool colors like light blue, black, and beige. It offers 12 GB of RAM and 128 GB of storage as a base model, but you can choose versions with more storage (256 GB or 512 GB). It's important to note that you can't expand storage with a microSD card. The phone's display is exceptional, with super bright settings that make it easy to use outdoors. It has a solid processor for everyday tasks, but it might not handle really demanding games as well as some competitors. When it comes to photos, Google's software and artificial intelligence make the Pixel 8 Pro stand out. The battery life is decent for a day of use, but it could be better. The main downside is the higher price compared to previous generations, even though Google promises seven years of updates . Read also: Best camera phones to buy in\\xa02024 Some people might compare it to iPhones, Samsung Galaxy phones, or Xiaomi phones, which also cost a lot. Those phones may have faster processors, but the Pixel 8 Pro shines in display quality and camera performance. However, it charges slowly, doesn't come with a power adapter, and some promised features aren't available right away. We'll have to wait and see if Google can keep its promise of long-term updates. Summary Buy Google Pixel 8 Pro Good A smartphone camera at its best Merciless update promise Better haptics than the predecessor Sufficient everyday performance Great AI functions 1-120 Hz display Bad G3 is not a flagship processor Price hike No charger included Some promised features are still missing Check offer $ 709 . 99 (128 GB -  new) * Check offer (Google) * Check offer (BestBuy) * Go to review Google Pixel 8 Pro $999.00 Check offer $ 709 . 99 (128 GB -  new) Check offer (Google) Check offer (BestBuy) The best sub-$1,000 compact/foldable: Galaxy Z Flip 5 Bigger and more functional: The cover screen offers many more possibilities in 2024. / © nextpit With the discontinuation of compact phones such as the iPhone mini and the Asus Zenfone, flip phones are the de facto compact smartphones nowadays. The Galaxy Z Flip 5 may not be the newest of those, but it offers almost the same features and performance as its successor, with a lower price (and more frequent deals). The external screen was expanded to display selected apps ( but there are workarounds here ) so you don't need to open the phone all the time. And the Z Flip 5 got a couple of Galaxy AI features since its launch , with more to come. There are a few compromises in the Flip experience though: The camera is not as versatile, and battery life is shorter than our other selections. Summary Buy Samsung Galaxy Z Flip 5 Good Truly useful cover display Improved hinge mechanics Balanced display image quality Fluid software experience Above-average camera quality Bad Slightly larger crease in the display Only average battery life Charging time exceeds one hour No charger included in the box Check offer $ 667 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Go to review Samsung Galaxy Z Flip 5 $999.99 Check offer $ 667 . 99 (128GB -  new) Check offer (Samsung) Free w/ trade-in (T-Mobile) Why are\\xa0sub-$1,000 smartphones not real\\xa0flagships anymore? With phones long past the $1000 mark, we will inevitably deal with trade-offs when looking for an option under that price. A few features like 5G, eSIM, NFC, and wireless charging are still standard in this category, but in other categories, we still find some differentiation. So for this selection we concentrated on the following specs: Our selection criteria Display: The screen characteristics influence not only how sharp (resolution) or smooth (refresh rate) content is displayed, they also indicate how big or small the phone is. We chose options that range from the pocket-friendly Galaxy Flip all the way to the big 6.7-inch camera alternative. Performance: Although all phones above should perform pretty well in both apps and games with their flagship SoCs.\\xa0The amount of RAM will determine how fluid will be the multitasking performance, especially with the memory demands of AI features. Also, be careful to avoid 128 GB storage models if you like to have a lot of apps, photos, and videos stored on your device. Camera: The feature that separates these phones from those in the cheaper selections is mainly the cameras: Better image quality with bigger sensors, models with telephoto lenses for zoomed shots, and better image processing for night images and filters. If you like to photograph big vistas, make sure the ultra-wide lens has enough resolution for your photos, on the other hand, prioritize a telephoto lens if you usually struggle to get a good enough zoom on your subjects. Buying advice What to expect from a $1,000 smartphone in 2024 Smartphones that cost less than $1,000 have become less premium in nature, but they are still considered high-end smartphones. When buying a smartphone close to the $1,000 mark, it is clear that compromises will have to be made, although not to the extent of a $400 smartphone. To remain relevant at the $1,000 price point, these smartphones offer everything you need to have an almost flawless user experience. You will benefit from an excellent update policy with at least five years of security updates. The finish and workmanship should be impeccable with IP68 certification and a glass back to boot. Battery life is not to be sneezed at, thanks to the huge battery capacities that lie between 4,000 and 5,000 mAh. When it comes to the camera, you can expect very good image quality and even a telephoto lens. Compromises made in a sub-$1,000 smartphones As mentioned earlier, there are compromises made in a smartphone that falls within this price range that will not make it a crippling experience. The user experience is still pleasant enough, and you can do almost anything you want with your smartphone. However, just like the cameras help separate $1000 phones from $600 models, true flagship phones have even more advanced cameras. Manufacturers also differentiate their high-end smartphones with hardware elements such as a less impressive primary lens, an older SoC, or by using older connectivity and fast charging standards. That's it for our buying guide of the best sub-$1,000 smartphones. Depending on what you are looking for, we hope you found your next flagship! Upcoming sales events Black Week 25 to 29 November 2024 Black Friday 29 November 2024 Cyber Monday 2 December 2024 Amazon Prime Day tbc What do you think of the fact that smartphones under $1,000 are not the 'real' flagships anymore? Do you have any suggestions for models that could have been part of this selection? Last updated in November 2024. Older comments were kept and may refer to older versions of this guide. The best smartphones under $400 Editorial tip Price tip 3rd place 4th place 5th place Product Google Pixel 6a Apple iPhone SE (2022) Samsung Galaxy A53 OnePlus Nord N20 Motorola Moto G Stylus 5G (2023) Image Review Review: Google Pixel 6a Review: Apple iPhone SE (2022) Review: Samsung Galaxy A53 Not yet tested Not yet tested Price (MSRP) $449.00 $429.00 $449.99 $299.00 $399.00 Offer* Check offer $ 299 . 99 (Amazon -  new) * Check offer (BestBuy) * Check offer (Walmart) * Check offer $ 313 . 17 (64 GB -  new) * Free w/ trade-in (T-Mobile) * $170.24 w/ plan (Walmart) * Check offer $ 329 . 99 (128 GB -  new) * Check offer (Samsung) * Check offer (Walmart) * Check offer (BestBuy) * Check offer (OnePlus) * Find on Amazon (Amazon) * Check offer (Motorola) * Free w/ trade-in (T-Mobile) * Find on Amazon (Amazon) * Explore our guide for phones under $400 Samsung Samsung Galaxy Z Flip 5 ⭐ Google Google Pixel 8 Pro ⭐ Samsung Galaxy S24 ⭐ Apple Apple iPhone 16 ⭐ + Previous article Previous article Next article Next article nextpit receives a commission for purchases made via the marked links. This has no influence on the editorial content and there are no costs for you. You can find out more about how we make money on our transparency page . Go to comment (0) Rubens Eishima Writer Having written about technology since 2008 for a number of websites in Brazil, Spain, Denmark, and Germany, I specialize in the mobile ecosystem, including various models, components, and apps. I tend to not only value performance and specifications, but also things like repairability, durability, and manufacturer support. I tend to prioritize the end-user's point of view whenever possible. To the author profile Liked this article? Share now! Follow us: Recommended articles Android Tablets Compared: These Are the Best Models to Buy in 2024 Rubens Eishima 2 days ago The Best Phones Under $400 That Are Worth Your Money Camila Rinaldi 1 week ago Xiaomi or Samsung? Phones, Ecosystems and Updates Compared Carsten Drees 3 weeks ago Hidden iOS 18 Trick: iPhone Reboots Itself to Boost Anti-Theft Security Jade Bryan 20 hours ago How to Use Your Phone as a Wi-Fi Extender Rahul Srinivas 1 day ago Android 15: Which Phones Are Expected to Get the Update? Rubens Eishima 2 days ago Latest articles Buying Guide: Smart Scales With And Without Handles Compared Stefan Möllenhoff 16 hours ago Top 5 Apps of the Week: Carrion, Pokémon TCG Pocket, and More! Edwin Kee 22 hours ago One of the Most Famous Video Game Classics is Free This Week Corinna Oettinger 1 day ago Our Favorite Bluetti AC200L Power Station is $1000 Off Jade Bryan 1 day ago Get These Android and iOS Apps for Free This Weekend Edwin Kee 1 day ago Up Comments Push notification All offers Share article Save in Pocket Next article No comments Write new comment: All changes will be saved. No drafts are saved when editing Submit Write new comment: All changes will be saved. No drafts are saved when editing Submit Cancel ✕ Top Content Our Favorite Bluetti AC200L Power Station is $1000 Off Recommended editorial content Jobbio With your consent, external content is loaded here. Activate content By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy . Sign in Sign up Continue with Google Continue with Facebook or Email address Password Forgot password? Stay signed in Login Don't have an nextpit account yet? Register here Register for free and become part of our community. As a registered member, you can leave comments, exchange ideas with others, take part in raffles and be active in the forum. User name This name will be shown publicly on your posts in the community. (At least 3 characters!) Email address Password Stay signed in I accept the terms and conditions and the privacy policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Finish Our Formats News Best List How To Opinion Polls Deals Reviews Versus Our Topics Smartphone Headphones Wearables Apps eMobility Smart Home More Top Content Samsung Galaxy S23 review Apple iPhone 15 Pro Max review Secret codes for Android phones Best offline games for Android Best iOS Apps Best Android Apps iPhone comparison 2024 iOS 17: Best features in a nutshell Android 14: Everything you need to know about nextpit International Deutsch : nextpit.de Deutsch : inside-digital.de English : nextpit.com Español : nextpit.es Português : nextpit.com.br Français : nextpit.fr Italiano : nextpit.it nextpit since 2009 Follow us: Home Staff Jobs at nextpit About us Site notice Terms & Conditions Privacy Policy Help Manage notifications Advertising\", 'score': 0.99910307}]\n",
            "{'tavily_search': {'blogs_content': [{'title': 'The Best Phones Under $1000 to Buy Today - NextPit', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': \"The Best Phones Under $1000 to Buy Today Buying Guide Buying Guide Smartphones The best smartphones Best under $400 Best under $200 Wearables The best Bluetooth headphones to buy in 2024 Which Garmin smartwatch is the best for me? The best Apple and Android smartwatches of 2024 Deals Samsung Galaxy S22: Should you buy it now? Buying the iPhone 13? Best OnePlus 11 offer: Where to buy it! Our Favorite Bluetti AC200L Power Station is $1000 Off Apple's M2 MacBook Air with 16 GB RAM for $749 is a Must-Have Laptop Apple's Thinner Watch Series 10 Falls to a New Low for 13% Off Reviews Reviews Smartphone Samsung Galaxy S23 Ultra review Samsung Galaxy S23 review Samsung Galaxy S23+ review Apple iPhone 14 Plus review Wearables OnePlus Buds Pro 2 review Sony WH-1000XM5 review Apple Watch Ultra review Nuki Smart Lock Pro 4.0 Review: Bid Your Keys Goodbye How This Withings Smart Scale Transformed My Understanding of My Body Samsung Galaxy Tab S10+: The Productivity Powerhouse You Pay For News News Apple iPhone Comparison Best iPad Samsung Galaxy S23 Ultra vs S22 Ultra Which Samsung phones will receive Android 13? Smartphone Android 13 iOS 16.4 Beta Wearables Apps Hidden iOS 18 Trick: iPhone Reboots Itself to Boost Anti-Theft Security Top 5 Apps of the Week: Carrion, Pokémon TCG Pocket, and More! One of the Most Famous Video Game Classics is Free This Week How To How To Smarthome How to check the battery status Samsung One UI Top 10 Android 13 gestures Apps Contacts not showing in WhatsApp? Get fast and easy translations on your Android Activate the incognito mode on YouTube How to Use Your Phone as a Wi-Fi Extender How to Install Xiaomi's Super Wallpapers on Compatible Android Smartphones Possible Fix for YouTube's New Update Glitches Topics Topics Smartphones Wearables Apps eMobility Smart Home More Forum Forum Latest forum posts Whatsapp non officiel avec mon numero de telephone The transition from Dalvik to Android Runtime (ART) has significantly enhanced app performance via JIT and AOT compilation. How do these techniques di Using AI to create Images Hello from a Newbie! Waze is not showing the map! Additional Macro Lens for Moto G Fast Hello everyone Gimbooks Pay Unanswered The transition from Dalvik to Android Runtime (ART) has significantly enhanced app performance via JIT and AOT compilation. How do these techniques di Gimbooks Pay [APP] Unique Zipper Lock Screen - Zip Lock New Member Introduction [App] 3D Parallax Wallpaper & Wallpaper 4K PHOTOS OUT OF ORDER ON WHATSAPP Kids Match Game: Play & Learn WhatsApp is pausing the audio when it’s on my ear Quick Links Recent posts Ask a question Post new thread Our forum rules Mods + Admins Hall of Fame Community Guide Search Login Hot topics Android 15 iOS 18 iPhone 16 iPhone 16 Pro Home Smartphone Hardware The Best Sub-$1,000 Smartphones You Can Buy in 2024 7 min read 7 min No comments 0 Nov 11, 2024, 10:46 AM © nextpit Rubens Eishima Writer Which high-end smartphone should you buy for under $1,000 in 2024? To help you choose the most powerful smartphone, the best camera smartphone, or simply a compact option, we have selected for you the best affordable flagships of the moment. Such as the Galaxy S24, the iPhone 16, and the Google Pixel 8 Pro. Table of Contents: The best sub-$1,000 smartphones in 2024 The best Android sub-$1000: Samsung Galaxy S24 The best sub-$1,000 iPhone: Apple iPhone 16 The best camera alternative under $1,000: Googl e Pixel 8\\xa0Pro The best sub-$1,000 foldable: Galaxy Z Flip 5 Why we select these\\xa0sub-$1,000 phones The best sub-$1,000 smartphones in 2024 Editor's choice The best iPhone Camera alternative Compact option Product Samsung Galaxy S24 Apple iPhone 16 Google Pixel 8 Pro Samsung Galaxy Z Flip 5 Picture Review Review: Samsung Galaxy S24 Review: Apple iPhone 16 Review: Google Pixel 8 Pro Review: Samsung Galaxy Z Flip 5 Performance Snapdragon 8 Gen 3 (US) Exynos 2400 (global) 8 GB LPDDR5X RAM 128 GB UFS 3.1 storage 256 GB UFS 4.0 storage No storage expansion Apple A18 8 GB RAM 128 / 256 / 512 GB storage No storage expansion Google Tensor G3 12 GB LPDDR5x RAM 128 / 256 / 512 / 1024 GB UFS 3.1 storage No storage expansion Snapdragon 8 Gen 2 8 GB RAM 256 / 512 GB UFS 4.0 storage No storage expansion Camera Wide: 50 MP, f/1.8, OIS Ultra-wide: 12 MP, f/2.2 3x telephoto: 10 MP, f/2.4, OIS Selfie: 12 MP, f/2.2 Main: 48 MP, f/1.6, OIS Ultra-wide: 12 MP, f/2.2 - Selfie: 12 MP, f/1.9 Main: 50 MP, f/1.68, OIS Ultra-wide: 48 MP, f/1.95 5x telephoto: 48 MP, f/2.8 Selfie: 10.5 MP, f/2.2 Main: 12 MP, f/1.8, OIS Ultra-wide: 12 MP, f/2.2 - Selfie: 10 MP, f/2.2 Offer* Check offer $ 799 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Check offer $ 0 . 01 (128 GB -  new) * Check offer (BestBuy) * Find on eBay (eBay) * Check offer $ 709 . 99 (128 GB -  new) * Check offer (Google) * Check offer (BestBuy) * Check offer $ 667 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * The best sub-$1000 Android: Samsung Galaxy S24 The S24 beautiful back can also delight smartphone customers. / © nextpit Shortly after its release, the Samsung Galaxy S24 quickly became our top pick for the best smartphones under $1,000. With this new model, Samsung has outdone itself once again, launching an impressive high-end device that not only features an exceptional 6.2-inch display but also delivers powerful performance with the Snapdragon 8 Gen 3 processor. Additionally, users can expect up to seven years of updates and innovative AI functions . Our review of the Galaxy S24 dives into what you can expect from these features. Also read: Best Samsung smartphones to buy in 2024 Samsung has remained true to its dimensions, and you can expect a compact semi-flagship with a good feel. Unfortunately, there are no innovations in the camera area, which is not necessarily a bad thing as the camera setup is still one of the best on the market. The battery also lasts a long time, but you are missing a modern quick-charging feature. Summary Buy Samsung Galaxy S24 Good Powerful AI functions Outstanding display Compact and good feel Commendable update policy Performance is absolutely okay Bad No camera upgrade 128 GB UFS 3.1 memory Larger battery, shorter runtime Charging not up to date Check offer $ 799 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Go to review Samsung Galaxy S24 Check offer $ 799 . 99 (128GB -  new) Check offer (Samsung) Free w/ trade-in (T-Mobile) The best sub-$1,000 iPhone: Apple iPhone 16 The new aligned camera arrangement makes it easy to spot the new model. / © nextpit With a streamlined selection of phones and with the discontinuation of the previous generation Pro model, the vanilla iPhone is the usual suggestion in this price category. For 2024, the demands of the AI trend dictated two discreet upgrades on the base model: Expanded RAM and a new A18 processor ready to power all the Apple Intelligence the phone can get and bring better energy efficiency to boot. Additionally, the iPhone 16 has not one but two new buttons, the Action button which debuted on the iPhone 15 Pro family, and the Camera Control, a capacitive and dual-stage button that can be used as a shutter button, shortcut, and camera settings selector. All these upgrades make the iPhone a more versatile camera for both stills and video. Summary Buy Apple iPhone 16 Good New shortcuts with the Action Button and Camera Control Major hardware upgrade thanks to A18 SoC and 8 GB RAM Image quality can be customized in many ways Outstanding battery life Bad Lags behind the competition without AI integration Only 60 Hz refresh rate for the display Camera Control is only really practical in landscape mode Check offer $ 0 . 01 (128 GB -  new) * Check offer (BestBuy) * Find on eBay (eBay) * Go to review Apple iPhone 16 $829.99 Check offer $ 0 . 01 (128 GB -  new) Check offer (BestBuy) Find on eBay (eBay) The best camera phone under $1,000: Google Pixel 8\\xa0Pro The Pixel 8 Pro is the king of smartphone photography. / © nextpit The Google Pixel 8 Pro is a pricier option than before, starting at $999, and it comes in cool colors like light blue, black, and beige. It offers 12 GB of RAM and 128 GB of storage as a base model, but you can choose versions with more storage (256 GB or 512 GB). It's important to note that you can't expand storage with a microSD card. The phone's display is exceptional, with super bright settings that make it easy to use outdoors. It has a solid processor for everyday tasks, but it might not handle really demanding games as well as some competitors. When it comes to photos, Google's software and artificial intelligence make the Pixel 8 Pro stand out. The battery life is decent for a day of use, but it could be better. The main downside is the higher price compared to previous generations, even though Google promises seven years of updates . Read also: Best camera phones to buy in\\xa02024 Some people might compare it to iPhones, Samsung Galaxy phones, or Xiaomi phones, which also cost a lot. Those phones may have faster processors, but the Pixel 8 Pro shines in display quality and camera performance. However, it charges slowly, doesn't come with a power adapter, and some promised features aren't available right away. We'll have to wait and see if Google can keep its promise of long-term updates. Summary Buy Google Pixel 8 Pro Good A smartphone camera at its best Merciless update promise Better haptics than the predecessor Sufficient everyday performance Great AI functions 1-120 Hz display Bad G3 is not a flagship processor Price hike No charger included Some promised features are still missing Check offer $ 709 . 99 (128 GB -  new) * Check offer (Google) * Check offer (BestBuy) * Go to review Google Pixel 8 Pro $999.00 Check offer $ 709 . 99 (128 GB -  new) Check offer (Google) Check offer (BestBuy) The best sub-$1,000 compact/foldable: Galaxy Z Flip 5 Bigger and more functional: The cover screen offers many more possibilities in 2024. / © nextpit With the discontinuation of compact phones such as the iPhone mini and the Asus Zenfone, flip phones are the de facto compact smartphones nowadays. The Galaxy Z Flip 5 may not be the newest of those, but it offers almost the same features and performance as its successor, with a lower price (and more frequent deals). The external screen was expanded to display selected apps ( but there are workarounds here ) so you don't need to open the phone all the time. And the Z Flip 5 got a couple of Galaxy AI features since its launch , with more to come. There are a few compromises in the Flip experience though: The camera is not as versatile, and battery life is shorter than our other selections. Summary Buy Samsung Galaxy Z Flip 5 Good Truly useful cover display Improved hinge mechanics Balanced display image quality Fluid software experience Above-average camera quality Bad Slightly larger crease in the display Only average battery life Charging time exceeds one hour No charger included in the box Check offer $ 667 . 99 (128GB -  new) * Check offer (Samsung) * Free w/ trade-in (T-Mobile) * Go to review Samsung Galaxy Z Flip 5 $999.99 Check offer $ 667 . 99 (128GB -  new) Check offer (Samsung) Free w/ trade-in (T-Mobile) Why are\\xa0sub-$1,000 smartphones not real\\xa0flagships anymore? With phones long past the $1000 mark, we will inevitably deal with trade-offs when looking for an option under that price. A few features like 5G, eSIM, NFC, and wireless charging are still standard in this category, but in other categories, we still find some differentiation. So for this selection we concentrated on the following specs: Our selection criteria Display: The screen characteristics influence not only how sharp (resolution) or smooth (refresh rate) content is displayed, they also indicate how big or small the phone is. We chose options that range from the pocket-friendly Galaxy Flip all the way to the big 6.7-inch camera alternative. Performance: Although all phones above should perform pretty well in both apps and games with their flagship SoCs.\\xa0The amount of RAM will determine how fluid will be the multitasking performance, especially with the memory demands of AI features. Also, be careful to avoid 128 GB storage models if you like to have a lot of apps, photos, and videos stored on your device. Camera: The feature that separates these phones from those in the cheaper selections is mainly the cameras: Better image quality with bigger sensors, models with telephoto lenses for zoomed shots, and better image processing for night images and filters. If you like to photograph big vistas, make sure the ultra-wide lens has enough resolution for your photos, on the other hand, prioritize a telephoto lens if you usually struggle to get a good enough zoom on your subjects. Buying advice What to expect from a $1,000 smartphone in 2024 Smartphones that cost less than $1,000 have become less premium in nature, but they are still considered high-end smartphones. When buying a smartphone close to the $1,000 mark, it is clear that compromises will have to be made, although not to the extent of a $400 smartphone. To remain relevant at the $1,000 price point, these smartphones offer everything you need to have an almost flawless user experience. You will benefit from an excellent update policy with at least five years of security updates. The finish and workmanship should be impeccable with IP68 certification and a glass back to boot. Battery life is not to be sneezed at, thanks to the huge battery capacities that lie between 4,000 and 5,000 mAh. When it comes to the camera, you can expect very good image quality and even a telephoto lens. Compromises made in a sub-$1,000 smartphones As mentioned earlier, there are compromises made in a smartphone that falls within this price range that will not make it a crippling experience. The user experience is still pleasant enough, and you can do almost anything you want with your smartphone. However, just like the cameras help separate $1000 phones from $600 models, true flagship phones have even more advanced cameras. Manufacturers also differentiate their high-end smartphones with hardware elements such as a less impressive primary lens, an older SoC, or by using older connectivity and fast charging standards. That's it for our buying guide of the best sub-$1,000 smartphones. Depending on what you are looking for, we hope you found your next flagship! Upcoming sales events Black Week 25 to 29 November 2024 Black Friday 29 November 2024 Cyber Monday 2 December 2024 Amazon Prime Day tbc What do you think of the fact that smartphones under $1,000 are not the 'real' flagships anymore? Do you have any suggestions for models that could have been part of this selection? Last updated in November 2024. Older comments were kept and may refer to older versions of this guide. The best smartphones under $400 Editorial tip Price tip 3rd place 4th place 5th place Product Google Pixel 6a Apple iPhone SE (2022) Samsung Galaxy A53 OnePlus Nord N20 Motorola Moto G Stylus 5G (2023) Image Review Review: Google Pixel 6a Review: Apple iPhone SE (2022) Review: Samsung Galaxy A53 Not yet tested Not yet tested Price (MSRP) $449.00 $429.00 $449.99 $299.00 $399.00 Offer* Check offer $ 299 . 99 (Amazon -  new) * Check offer (BestBuy) * Check offer (Walmart) * Check offer $ 313 . 17 (64 GB -  new) * Free w/ trade-in (T-Mobile) * $170.24 w/ plan (Walmart) * Check offer $ 329 . 99 (128 GB -  new) * Check offer (Samsung) * Check offer (Walmart) * Check offer (BestBuy) * Check offer (OnePlus) * Find on Amazon (Amazon) * Check offer (Motorola) * Free w/ trade-in (T-Mobile) * Find on Amazon (Amazon) * Explore our guide for phones under $400 Samsung Samsung Galaxy Z Flip 5 ⭐ Google Google Pixel 8 Pro ⭐ Samsung Galaxy S24 ⭐ Apple Apple iPhone 16 ⭐ + Previous article Previous article Next article Next article nextpit receives a commission for purchases made via the marked links. This has no influence on the editorial content and there are no costs for you. You can find out more about how we make money on our transparency page . Go to comment (0) Rubens Eishima Writer Having written about technology since 2008 for a number of websites in Brazil, Spain, Denmark, and Germany, I specialize in the mobile ecosystem, including various models, components, and apps. I tend to not only value performance and specifications, but also things like repairability, durability, and manufacturer support. I tend to prioritize the end-user's point of view whenever possible. To the author profile Liked this article? Share now! Follow us: Recommended articles Android Tablets Compared: These Are the Best Models to Buy in 2024 Rubens Eishima 2 days ago The Best Phones Under $400 That Are Worth Your Money Camila Rinaldi 1 week ago Xiaomi or Samsung? Phones, Ecosystems and Updates Compared Carsten Drees 3 weeks ago Hidden iOS 18 Trick: iPhone Reboots Itself to Boost Anti-Theft Security Jade Bryan 20 hours ago How to Use Your Phone as a Wi-Fi Extender Rahul Srinivas 1 day ago Android 15: Which Phones Are Expected to Get the Update? Rubens Eishima 2 days ago Latest articles Buying Guide: Smart Scales With And Without Handles Compared Stefan Möllenhoff 16 hours ago Top 5 Apps of the Week: Carrion, Pokémon TCG Pocket, and More! Edwin Kee 22 hours ago One of the Most Famous Video Game Classics is Free This Week Corinna Oettinger 1 day ago Our Favorite Bluetti AC200L Power Station is $1000 Off Jade Bryan 1 day ago Get These Android and iOS Apps for Free This Weekend Edwin Kee 1 day ago Up Comments Push notification All offers Share article Save in Pocket Next article No comments Write new comment: All changes will be saved. No drafts are saved when editing Submit Write new comment: All changes will be saved. No drafts are saved when editing Submit Cancel ✕ Top Content Our Favorite Bluetti AC200L Power Station is $1000 Off Recommended editorial content Jobbio With your consent, external content is loaded here. Activate content By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy . Sign in Sign up Continue with Google Continue with Facebook or Email address Password Forgot password? Stay signed in Login Don't have an nextpit account yet? Register here Register for free and become part of our community. As a registered member, you can leave comments, exchange ideas with others, take part in raffles and be active in the forum. User name This name will be shown publicly on your posts in the community. (At least 3 characters!) Email address Password Stay signed in I accept the terms and conditions and the privacy policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Finish Our Formats News Best List How To Opinion Polls Deals Reviews Versus Our Topics Smartphone Headphones Wearables Apps eMobility Smart Home More Top Content Samsung Galaxy S23 review Apple iPhone 15 Pro Max review Secret codes for Android phones Best offline games for Android Best iOS Apps Best Android Apps iPhone comparison 2024 iOS 17: Best features in a nutshell Android 14: Everything you need to know about nextpit International Deutsch : nextpit.de Deutsch : inside-digital.de English : nextpit.com Español : nextpit.es Português : nextpit.com.br Français : nextpit.fr Italiano : nextpit.it nextpit since 2009 Follow us: Home Staff Jobs at nextpit About us Site notice Terms & Conditions Privacy Policy Help Manage notifications Advertising\", 'score': 0.99910307}]}}\n",
            "{'schema_mapping': {'product_schema': [{'title': 'Samsung Galaxy S24', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Samsung Galaxy S24 is a high-end smartphone with a 6.2-inch display, powerful performance, and up to seven years of updates.', 'pros': ['Powerful AI functions', 'Outstanding display', 'Compact and good feel', 'Commendable update policy', 'Performance is absolutely okay'], 'cons': ['No camera upgrade', '128 GB UFS 3.1 memory', 'Larger battery, shorter runtime', 'Charging not up to date'], 'highlights': {'Processor': 'Snapdragon 8 Gen 3 (US) / Exynos 2400 (global)', 'RAM': '8 GB LPDDR5X RAM', 'Storage': '128 GB UFS 3.1 storage / 256 GB UFS 4.0 storage', 'Camera': 'Wide: 50 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / 3x telephoto: 10 MP, f/2.4, OIS / Selfie: 12 MP, f/2.2'}, 'score': 0.0}, {'title': 'Apple iPhone 16', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Apple iPhone 16 is a high-end smartphone with a streamlined selection of phones and two discreet upgrades on the base model: Expanded RAM and a new A18 processor.', 'pros': ['New shortcuts with the Action Button and Camera Control', 'Major hardware upgrade thanks to A18 SoC and 8 GB RAM', 'Image quality can be customized in many ways', 'Outstanding battery life'], 'cons': ['Lags behind the competition without AI integration', 'Only 60 Hz refresh rate for the display', 'Camera Control is only really practical in landscape mode'], 'highlights': {'Processor': 'Apple A18', 'RAM': '8 GB RAM', 'Storage': '128 / 256 / 512 GB storage', 'Camera': 'Main: 48 MP, f/1.6, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 12 MP, f/1.9'}, 'score': 0.0}, {'title': 'Google Pixel 8 Pro', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Google Pixel 8 Pro is a high-end smartphone with a 6.7-inch display, 12 GB of RAM, and 128 GB of storage as a base model.', 'pros': ['A smartphone camera at its best', 'Merciless update promise', 'Better haptics than the predecessor', 'Sufficient everyday performance', 'Great AI functions', '1-120 Hz display'], 'cons': ['G3 is not a flagship processor', 'Price hike', 'No charger included', 'Some promised features are still missing'], 'highlights': {'Processor': 'Google Tensor G3', 'RAM': '12 GB LPDDR5x RAM', 'Storage': '128 / 256 / 512 / 1024 GB UFS 3.1 storage', 'Camera': 'Main: 50 MP, f/1.68, OIS / Ultra-wide: 48 MP, f/1.95 / 5x telephoto: 48 MP, f/2.8 / Selfie: 10.5 MP, f/2.2'}, 'score': 0.0}, {'title': 'Samsung Galaxy Z Flip 5', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Samsung Galaxy Z Flip 5 is a compact flip smartphone with a 6.7-inch display, 8 GB of RAM, and 256 GB of storage.', 'pros': ['Truly useful cover display', 'Improved hinge mechanics', 'Balanced display image quality', 'Fluid software experience', 'Above-average camera quality'], 'cons': ['Slightly larger crease in the display', 'Only average battery life', 'Charging time exceeds one hour', 'No charger included in the box'], 'highlights': {'Processor': 'Snapdragon 8 Gen 2', 'RAM': '8 GB RAM', 'Storage': '256 / 512 GB UFS 4.0 storage', 'Camera': 'Main: 12 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 10 MP, f/2.2'}, 'score': 0.0}]}}\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "{'comparisons': [{'product_name': 'Samsung Galaxy S24',\n",
              "   'specs_comparison': {'processor': 'Snapdragon 8 Gen 3 (US) / Exynos 2400 (global)',\n",
              "    'battery': 'Unknown',\n",
              "    'camera': 'Wide: 50 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / 3x telephoto: 10 MP, f/2.4, OIS / Selfie: 12 MP, f/2.2',\n",
              "    'display': '6.2-inch',\n",
              "    'storage': '128 GB UFS 3.1 storage / 256 GB UFS 4.0 storage'},\n",
              "   'ratings_comparison': {'overall_rating': 4.2,\n",
              "    'performance': 4.5,\n",
              "    'battery_life': 3.8,\n",
              "    'camera_quality': 4.5,\n",
              "    'display_quality': 4.5},\n",
              "   'reviews_summary': 'The Samsung Galaxy S24 has a powerful AI function, an outstanding display, and a compact design. However, it lacks a camera upgrade, has limited storage, and a shorter battery life.'},\n",
              "  {'product_name': 'Apple iPhone 16',\n",
              "   'specs_comparison': {'processor': 'Apple A18',\n",
              "    'battery': 'Unknown',\n",
              "    'camera': 'Main: 48 MP, f/1.6, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 12 MP, f/1.9',\n",
              "    'display': 'Unknown',\n",
              "    'storage': '128 / 256 / 512 GB storage'},\n",
              "   'ratings_comparison': {'overall_rating': 4.4,\n",
              "    'performance': 4.7,\n",
              "    'battery_life': 4.5,\n",
              "    'camera_quality': 4.3,\n",
              "    'display_quality': 4.2},\n",
              "   'reviews_summary': 'The Apple iPhone 16 has a major hardware upgrade with the A18 SoC and 8 GB RAM, outstanding battery life, and customizable image quality. However, it lags behind the competition without AI integration and has a limited display refresh rate.'},\n",
              "  {'product_name': 'Google Pixel 8 Pro',\n",
              "   'specs_comparison': {'processor': 'Google Tensor G3',\n",
              "    'battery': 'Unknown',\n",
              "    'camera': 'Main: 50 MP, f/1.68, OIS / Ultra-wide: 48 MP, f/1.95 / 5x telephoto: 48 MP, f/2.8 / Selfie: 10.5 MP, f/2.2',\n",
              "    'display': '6.7-inch',\n",
              "    'storage': '128 / 256 / 512 / 1024 GB UFS 3.1 storage'},\n",
              "   'ratings_comparison': {'overall_rating': 4.6,\n",
              "    'performance': 4.4,\n",
              "    'battery_life': 4.1,\n",
              "    'camera_quality': 4.8,\n",
              "    'display_quality': 4.6},\n",
              "   'reviews_summary': 'The Google Pixel 8 Pro has an exceptional camera, a merciless update promise, and sufficient everyday performance. However, it has a non-flagship processor, a price hike, and some missing features.'},\n",
              "  {'product_name': 'Samsung Galaxy Z Flip 5',\n",
              "   'specs_comparison': {'processor': 'Snapdragon 8 Gen 2',\n",
              "    'battery': 'Unknown',\n",
              "    'camera': 'Main: 12 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 10 MP, f/2.2',\n",
              "    'display': '6.7-inch',\n",
              "    'storage': '256 / 512 GB UFS 4.0 storage'},\n",
              "   'ratings_comparison': {'overall_rating': 4.3,\n",
              "    'performance': 4.2,\n",
              "    'battery_life': 3.9,\n",
              "    'camera_quality': 4.2,\n",
              "    'display_quality': 4.3},\n",
              "   'reviews_summary': 'The Samsung Galaxy Z Flip 5 has a truly useful cover display, improved hinge mechanics, and balanced display image quality. However, it has a slightly larger crease in the display, only average battery life, and a long charging time.'}],\n",
              " 'best_product': {'product_name': 'Google Pixel 8 Pro',\n",
              "  'justification': 'Chosen for its exceptional camera, sufficient everyday performance, and outstanding display quality. Although it has some drawbacks, its overall rating and camera quality make it the best choice among the compared products.'}}"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "{'product_comparison': {'best_product': {'product_name': 'Google Pixel 8 Pro', 'justification': 'Chosen for its exceptional camera, sufficient everyday performance, and outstanding display quality. Although it has some drawbacks, its overall rating and camera quality make it the best choice among the compared products.'}, 'comparison': [{'product_name': 'Samsung Galaxy S24', 'specs_comparison': {'processor': 'Snapdragon 8 Gen 3 (US) / Exynos 2400 (global)', 'battery': 'Unknown', 'camera': 'Wide: 50 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / 3x telephoto: 10 MP, f/2.4, OIS / Selfie: 12 MP, f/2.2', 'display': '6.2-inch', 'storage': '128 GB UFS 3.1 storage / 256 GB UFS 4.0 storage'}, 'ratings_comparison': {'overall_rating': 4.2, 'performance': 4.5, 'battery_life': 3.8, 'camera_quality': 4.5, 'display_quality': 4.5}, 'reviews_summary': 'The Samsung Galaxy S24 has a powerful AI function, an outstanding display, and a compact design. However, it lacks a camera upgrade, has limited storage, and a shorter battery life.'}, {'product_name': 'Apple iPhone 16', 'specs_comparison': {'processor': 'Apple A18', 'battery': 'Unknown', 'camera': 'Main: 48 MP, f/1.6, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 12 MP, f/1.9', 'display': 'Unknown', 'storage': '128 / 256 / 512 GB storage'}, 'ratings_comparison': {'overall_rating': 4.4, 'performance': 4.7, 'battery_life': 4.5, 'camera_quality': 4.3, 'display_quality': 4.2}, 'reviews_summary': 'The Apple iPhone 16 has a major hardware upgrade with the A18 SoC and 8 GB RAM, outstanding battery life, and customizable image quality. However, it lags behind the competition without AI integration and has a limited display refresh rate.'}, {'product_name': 'Google Pixel 8 Pro', 'specs_comparison': {'processor': 'Google Tensor G3', 'battery': 'Unknown', 'camera': 'Main: 50 MP, f/1.68, OIS / Ultra-wide: 48 MP, f/1.95 / 5x telephoto: 48 MP, f/2.8 / Selfie: 10.5 MP, f/2.2', 'display': '6.7-inch', 'storage': '128 / 256 / 512 / 1024 GB UFS 3.1 storage'}, 'ratings_comparison': {'overall_rating': 4.6, 'performance': 4.4, 'battery_life': 4.1, 'camera_quality': 4.8, 'display_quality': 4.6}, 'reviews_summary': 'The Google Pixel 8 Pro has an exceptional camera, a merciless update promise, and sufficient everyday performance. However, it has a non-flagship processor, a price hike, and some missing features.'}, {'product_name': 'Samsung Galaxy Z Flip 5', 'specs_comparison': {'processor': 'Snapdragon 8 Gen 2', 'battery': 'Unknown', 'camera': 'Main: 12 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 10 MP, f/2.2', 'display': '6.7-inch', 'storage': '256 / 512 GB UFS 4.0 storage'}, 'ratings_comparison': {'overall_rating': 4.3, 'performance': 4.2, 'battery_life': 3.9, 'camera_quality': 4.2, 'display_quality': 4.3}, 'reviews_summary': 'The Samsung Galaxy Z Flip 5 has a truly useful cover display, improved hinge mechanics, and balanced display image quality. However, it has a slightly larger crease in the display, only average battery life, and a long charging time.'}]}}\n",
            "{'youtube_review': {'youtube_link': 'https://www.youtube.com/watch?v=1uSHiNkVGsc'}}\n",
            "{'display': {'products': [{'title': 'Samsung Galaxy S24', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Samsung Galaxy S24 is a high-end smartphone with a 6.2-inch display, powerful performance, and up to seven years of updates.', 'pros': ['Powerful AI functions', 'Outstanding display', 'Compact and good feel', 'Commendable update policy', 'Performance is absolutely okay'], 'cons': ['No camera upgrade', '128 GB UFS 3.1 memory', 'Larger battery, shorter runtime', 'Charging not up to date'], 'highlights': {'Processor': 'Snapdragon 8 Gen 3 (US) / Exynos 2400 (global)', 'RAM': '8 GB LPDDR5X RAM', 'Storage': '128 GB UFS 3.1 storage / 256 GB UFS 4.0 storage', 'Camera': 'Wide: 50 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / 3x telephoto: 10 MP, f/2.4, OIS / Selfie: 12 MP, f/2.2'}, 'score': 0.0}, {'title': 'Apple iPhone 16', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Apple iPhone 16 is a high-end smartphone with a streamlined selection of phones and two discreet upgrades on the base model: Expanded RAM and a new A18 processor.', 'pros': ['New shortcuts with the Action Button and Camera Control', 'Major hardware upgrade thanks to A18 SoC and 8 GB RAM', 'Image quality can be customized in many ways', 'Outstanding battery life'], 'cons': ['Lags behind the competition without AI integration', 'Only 60 Hz refresh rate for the display', 'Camera Control is only really practical in landscape mode'], 'highlights': {'Processor': 'Apple A18', 'RAM': '8 GB RAM', 'Storage': '128 / 256 / 512 GB storage', 'Camera': 'Main: 48 MP, f/1.6, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 12 MP, f/1.9'}, 'score': 0.0}, {'title': 'Google Pixel 8 Pro', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Google Pixel 8 Pro is a high-end smartphone with a 6.7-inch display, 12 GB of RAM, and 128 GB of storage as a base model.', 'pros': ['A smartphone camera at its best', 'Merciless update promise', 'Better haptics than the predecessor', 'Sufficient everyday performance', 'Great AI functions', '1-120 Hz display'], 'cons': ['G3 is not a flagship processor', 'Price hike', 'No charger included', 'Some promised features are still missing'], 'highlights': {'Processor': 'Google Tensor G3', 'RAM': '12 GB LPDDR5x RAM', 'Storage': '128 / 256 / 512 / 1024 GB UFS 3.1 storage', 'Camera': 'Main: 50 MP, f/1.68, OIS / Ultra-wide: 48 MP, f/1.95 / 5x telephoto: 48 MP, f/2.8 / Selfie: 10.5 MP, f/2.2'}, 'score': 0.0}, {'title': 'Samsung Galaxy Z Flip 5', 'url': 'https://www.nextpit.com/best-smartphones-under-1000', 'content': 'The Samsung Galaxy Z Flip 5 is a compact flip smartphone with a 6.7-inch display, 8 GB of RAM, and 256 GB of storage.', 'pros': ['Truly useful cover display', 'Improved hinge mechanics', 'Balanced display image quality', 'Fluid software experience', 'Above-average camera quality'], 'cons': ['Slightly larger crease in the display', 'Only average battery life', 'Charging time exceeds one hour', 'No charger included in the box'], 'highlights': {'Processor': 'Snapdragon 8 Gen 2', 'RAM': '8 GB RAM', 'Storage': '256 / 512 GB UFS 4.0 storage', 'Camera': 'Main: 12 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 10 MP, f/2.2'}, 'score': 0.0}], 'best_product': {'product_name': 'Google Pixel 8 Pro', 'justification': 'Chosen for its exceptional camera, sufficient everyday performance, and outstanding display quality. Although it has some drawbacks, its overall rating and camera quality make it the best choice among the compared products.'}, 'comparison': [{'product_name': 'Samsung Galaxy S24', 'specs_comparison': {'processor': 'Snapdragon 8 Gen 3 (US) / Exynos 2400 (global)', 'battery': 'Unknown', 'camera': 'Wide: 50 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / 3x telephoto: 10 MP, f/2.4, OIS / Selfie: 12 MP, f/2.2', 'display': '6.2-inch', 'storage': '128 GB UFS 3.1 storage / 256 GB UFS 4.0 storage'}, 'ratings_comparison': {'overall_rating': 4.2, 'performance': 4.5, 'battery_life': 3.8, 'camera_quality': 4.5, 'display_quality': 4.5}, 'reviews_summary': 'The Samsung Galaxy S24 has a powerful AI function, an outstanding display, and a compact design. However, it lacks a camera upgrade, has limited storage, and a shorter battery life.'}, {'product_name': 'Apple iPhone 16', 'specs_comparison': {'processor': 'Apple A18', 'battery': 'Unknown', 'camera': 'Main: 48 MP, f/1.6, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 12 MP, f/1.9', 'display': 'Unknown', 'storage': '128 / 256 / 512 GB storage'}, 'ratings_comparison': {'overall_rating': 4.4, 'performance': 4.7, 'battery_life': 4.5, 'camera_quality': 4.3, 'display_quality': 4.2}, 'reviews_summary': 'The Apple iPhone 16 has a major hardware upgrade with the A18 SoC and 8 GB RAM, outstanding battery life, and customizable image quality. However, it lags behind the competition without AI integration and has a limited display refresh rate.'}, {'product_name': 'Google Pixel 8 Pro', 'specs_comparison': {'processor': 'Google Tensor G3', 'battery': 'Unknown', 'camera': 'Main: 50 MP, f/1.68, OIS / Ultra-wide: 48 MP, f/1.95 / 5x telephoto: 48 MP, f/2.8 / Selfie: 10.5 MP, f/2.2', 'display': '6.7-inch', 'storage': '128 / 256 / 512 / 1024 GB UFS 3.1 storage'}, 'ratings_comparison': {'overall_rating': 4.6, 'performance': 4.4, 'battery_life': 4.1, 'camera_quality': 4.8, 'display_quality': 4.6}, 'reviews_summary': 'The Google Pixel 8 Pro has an exceptional camera, a merciless update promise, and sufficient everyday performance. However, it has a non-flagship processor, a price hike, and some missing features.'}, {'product_name': 'Samsung Galaxy Z Flip 5', 'specs_comparison': {'processor': 'Snapdragon 8 Gen 2', 'battery': 'Unknown', 'camera': 'Main: 12 MP, f/1.8, OIS / Ultra-wide: 12 MP, f/2.2 / Selfie: 10 MP, f/2.2', 'display': '6.7-inch', 'storage': '256 / 512 GB UFS 4.0 storage'}, 'ratings_comparison': {'overall_rating': 4.3, 'performance': 4.2, 'battery_life': 3.9, 'camera_quality': 4.2, 'display_quality': 4.3}, 'reviews_summary': 'The Samsung Galaxy Z Flip 5 has a truly useful cover display, improved hinge mechanics, and balanced display image quality. However, it has a slightly larger crease in the display, only average battery life, and a long charging time.'}], 'youtube_link': 'https://www.youtube.com/watch?v=1uSHiNkVGsc'}}\n",
            "Email sent successfully to asadsher2324@gmail.com.\n",
            "{'send_email': None}\n"
          ]
        }
      ]
    }
  ]
}